Inverse tone mapping method and corresponding device

ABSTRACT

The disclosure relates generally to the field of high dynamic range (HDR) imaging and addresses the way of expanding the dynamic range of low dynamic range images. A method having the steps of obtaining expansion exponent map data for each one of a plurality of clusters of reference images, obtaining, for each cluster, one feature, called visual feature, representative of the luminance of reference images of the cluster, obtaining a visual feature for the image, comparing the visual feature of the image with the visual features of the clusters according to a distance criterion, selecting the cluster, the visual feature of which is the closest to the visual feature of the image, and applying an expansion exponent map defined by the expansion exponent map data of the selected cluster to the image is described.

1. REFERENCE TO RELATED EUROPEAN APPLICATION

This application claims priority from European Patent Application No. 16305589.0, entitled “INVERSE TONE MAPPING METHOD AND CORRESPONDING DEVICE”, filed on May 23, 2016, the contents of which are hereby incorporated by reference in its entirety.

2. TECHNICAL FIELD

The present invention relates generally to the field of high dynamic range imaging and addresses the way of expanding the dynamic range of low dynamic range images.

3. BACKGROUND ART

Recent advancements in display technology are beginning to allow for an extended range of color, luminance and contrast to be displayed.

Technologies allowing for extensions in luminance or brightness range of image content are known as high dynamic range imaging, often shortened to HDR. HDR technologies focus on capturing, processing and displaying content of a wider dynamic range.

Although a number of HDR display devices have appeared, and image cameras capable of capturing images with an increased dynamic range are being developed, there is still very limited HDR content available. While recent developments promise native capture of HDR content in the near future, they do not address existing content.

To prepare conventional (hereon referred to as SDR for Standard dynamic range) content for HDR display devices, reverse or inverse tone mapping operators (iTMO) can be employed. Such algorithms process the luminance information of colors in the image content with the aim of recovering or recreating the appearance of the original scene.

Different kinds of inverse tone mapping algorithms exist, as for instance local tone mapping algorithms and global tone mapping algorithms. For example, in the field of local tone mapping algorithms, the patent application WO2015/096955 discloses a method comprising, for each pixel p of the image, the steps of obtaining a pixel expansion exponent value E(p) and then inverse tone mapping the luminance Y(p) according to the equation

Y _(exp)(p)=Y(p)^(E(p))  (1)

wherein Y_(exp)(p) is the expanded luminance value of the pixel p.

The set of values E(p) for all pixels of an image form the expansion exponent map for this image. The expansion exponent maps can be generated by different methods, for example by low-pass filtering.

Dedicated tools have been developed to implement inverse tone mapping methods to SDR images. These tools can be used either as a plugin within a post-production tool to help colorists for manual grading, or as hardware implementation within a SoC (System On Chip) for a set-top box or TV set. In the first case, the images are manually processed by colorists. The process gives good results (the artistic intent of the film makers can be preserved) but cannot be performed on the fly. In the latter case, predetermined expansion parameters are applied to the video sequences without any adaptation to the video content and without the intervention of colorists. The inverse tone mapping can thus be performed on the fly. But the results are not so good as those issued from a manual grading of colorists.

There is a need to set a global tone mapping algorithm that can adapt automatically to the content to tone-map.

4. SUMMARY OF INVENTION

It is an object of the invention to propose a method for inverse tone mapping that can be applied to video sequences on the fly and

A subject of the invention is a method for inverse tone mapping of an image, comprising the steps of:

-   -   obtaining expansion exponent map data for each one of at least         two clusters of reference images,     -   obtaining, for each of said at least two clusters, one feature,         called visual feature, representative of the luminance of         reference images of the cluster,     -   obtaining a visual feature for said image,     -   comparing the visual feature of said image with the visual         features of said at least two clusters according to a distance         criterion,     -   selecting, among said at least two clusters, the cluster, the         visual feature of which is the closest to the visual feature of         said image, and     -   applying an expansion exponent map defined by the expansion         exponent map data of the selected cluster to said image.

The two first steps are performed during a preliminary phase which is a training phase and the other steps are performed in a subsequent phase.

The training phase is performed offline. During this phase, expansion exponent map data and visual features are obtained for each cluster comprising reference images. The expansion exponent map data are extracted from a ground-truth delivered by colorists.

In a particular embodiment, the expansion exponent map data for a cluster are generated based on reference expansion exponent map data of the reference images of the cluster. These reference expansion exponent map data are preferably generated by colorists.

In a particular embodiment, the expansion exponent map is defined by parameters associated to a quadratic function. The expansion exponent map data are the parameters of said quadratic function. In this embodiment, the quadratic function parameters of the expansion exponent map of a cluster are obtained by:

-   -   obtaining the quadratic function parameters of the expansion         exponent map of each reference image of the cluster,     -   sorting the quadratic function parameters of the expansion         exponent maps of the reference images of the cluster in         ascending or descending order, and     -   selecting the median values of the sorted quadratic function         parameters as parameters of the quadratic function of the         expansion exponent map of the cluster.

In a specific embodiment, the quadratic function is defined by the relation:

E(p)=a[Y _(base)(p)]² +b[Y _(base)(p)]+c

where: Y_(base)(p) is a low-filtered luminance value of a pixel p of an image and a, b, and c are the parameters of the quadratic function.

In a particular embodiment, the visual feature for a cluster is generated based on visual features of the reference images of the cluster.

In a specific embodiment, the visual feature of a reference image or image is the histogram of the luminance levels of the pixels of said reference image or image.

In another embodiment, the luminance range of an image being divided in at least three consecutive luminance portions, the visual feature of said image comprises Gaussian function parameters defining at least three Gaussian functions approximating the histogram of the luminance levels of the pixels of said image in said at least three consecutive luminance portions respectively.

In this embodiment, the Gaussian function parameters of the visual feature of a cluster are obtained by:

-   -   obtaining the Gaussian function parameters of the visual feature         of each reference image of the cluster,     -   sorting the Gaussian function parameters of the visual features         of the reference images of the cluster in ascending or         descending order, and     -   selecting the median values of the sorted Gaussian function         parameters as parameters of the Gaussian function of the visual         feature of the cluster.

In this embodiment, the visual feature of an image is compared with the visual feature of a cluster by comparing their Gaussian function parameters.

Another subject of the invention is an image processing device comprising:

-   -   a memory for storing, for each one of at least two clusters of         reference images, expansion exponent map data and a feature,         called visual feature, representative of the luminance of         reference images of the cluster,     -   a pre-processor that obtains an image and a visual feature for         said image,     -   a comparator for comparing the visual feature of said image with         the visual features of said at least two clusters according to a         distance criterion, and selecting, among said at least two         clusters, the cluster, the visual feature of which is the         closest to the visual feature of said image,     -   an inverse tone mapper for applying the expansion exponent map         defined by expansion exponent map data of the selected cluster         to said image.

In a particular embodiment, the expansion exponent map is defined by parameters associated to a quadratic function. The stored expansion exponent map data are the parameters of said quadratic function.

In a specific embodiment, the quadratic function is defined by the relation:

E(p)=a[Y _(base)(p)]² +b[Y _(base)(p)]+c

where: Y_(base)(p) is a low-filtered luminance value of a pixel p of an image and a, b, and c are the parameters of the quadratic function.

The stored expansion exponent map data are the parameters a, b and c.

In a specific embodiment, the visual feature of an image is the histogram of the luminance levels of the pixels of said image and the comparator compares the histogram of the image with the histograms of the clusters.

In another embodiment, the luminance range of an image being divided in at least three consecutive luminance portions, the visual feature of said image comprises Gaussian function parameters defining at least three Gaussian functions approximating the histogram of the luminance levels of the pixels of said image in said at least three consecutive luminance portions respectively.

In this embodiment, the comparator compares the visual feature of an image with the visual feature of a cluster by comparing their Gaussian function parameters.

In a particular embodiment, the pre-processor is adapted to obtain a video sequence comprising a plurality of video shots, each video shot comprising at least one image. In that case, the image processing device preferably further comprises:

-   -   a cut detection circuit for detecting video shots in the video         sequence,     -   a selector for selecting one image in at least one shot of the         video sequence,

said selected image being used by the pre-processor, the comparator and the first selector for selecting, among said at least two clusters, the cluster, the expansion exponent map of which is to be applied by the inverse tone mapper to the images of the shot to which said selected image belongs.

5. BRIEF DESCRIPTION OF THE DRAWINGS

The invention can be better understood with reference to the following description and drawings, given by way of example and not limiting the scope of protection, and in which:

FIG. 1 is a flow chart of a method of inverse tone mapping of an image according to the invention;

FIG. 2 illustrates the generation of expansion exponent maps and visual features for clusters of reference images according to an embodiment of the invention; and

FIG. 3 is a block diagram of an image processing device according to an embodiment of the invention.

6. DESCRIPTION OF EMBODIMENTS

The functions of the various elements shown in the figures may be provided through the use of dedicated hardware as well as hardware capable of executing software in association with appropriate software.

It is to be understood that the invention may be implemented in various forms of hardware, software, firmware, special purpose processors, or combinations thereof. The term “processor” should not be construed to refer exclusively to hardware capable of executing software, and may implicitly include, without limitation, digital signal processor (“DSP”) hardware, read-only memory (“ROM”) for storing software, random access memory (“RAM”), and non-volatile storage. The invention may be notably implemented as a combination of hardware and software. Moreover, the software may be implemented as an application program tangibly embodied on a program storage unit. Such a software can take the form of a plug-in to be integrated to another software. The application program may be uploaded to, and executed by, an image processing device comprising any suitable architecture. Preferably, the image processing device is implemented on a computer platform having hardware such as one or more central processing units (“CPU”), a random access memory (“RAM”), and input/output (“I/O”) interfaces. The computer platform may also include an operating system and microinstruction code. The various processes and functions described herein may be either part of the microinstruction code or part of the application program, or any combination thereof, which may be executed by a CPU. In addition, various other peripheral units may be connected to the computer platform such as an additional data storage unit, a display device, or a printing unit. The image processing device implementing the embodiment of the method according to the invention may be part of any electronic device able to receive images, for instance a TV set, a set-top-box, a gateway, a cell phone, a tablet.

The present invention describes a method for obtaining an expansion exponent map to be applied to an image I of a video sequence.

FIG. 1 is a flowchart of a method of inverse tone mapping according an embodiment of the invention.

The method comprises a preliminary or training phase for generating expansion exponent maps and visual features for clusters of reference images and a subsequent phase for selecting and applying one of the expansion exponent maps during the training phase to an image I to be processed. The training phase is offset and done only once. And the subsequent phase is performed on the fly on the image I. The training phase and the subsequent phase can be performed in two different apparatus.

The global flow chart comprises six steps S1 to S6. The two first ones, S1 and S2, belong to the training phase and are generally performed offline. The four next steps, S3 to S6, are generally performed on the fly on the image I.

In the first step S1, expansion exponent map data are obtained for a plurality of clusters of reference images. The training phase will be described for three clusters. The reference images of a given cluster are images having expansion exponent maps, called reference expansion exponent maps that are close together according to a predetermined distance criterion. The reference expansion exponent maps are generated for each reference image by colorists by means of a dedicated tool and the close reference expansion exponent maps are put together in a cluster. The clustering operation may be performed by computing a Euclidian distance between the reference expansion exponent maps of each pair of reference expansion exponent maps and putting together, in clusters, close reference expansion exponent maps. The clustering operation may also be performed by using spectral clustering. The number of clusters may be defined by an operator or can be predetermined.

So, a single expansion exponent map is computed for each cluster based on the reference expansion exponent maps of the reference images of the cluster. This step is illustrated by FIG. 2. In this figure, there are 3 clusters, each comprising 30 reference images. A function representing an expansion exponent map is generated, for each cluster, based on the 30 reference expansion exponent maps of the reference images of the cluster.

In a specific embodiment, each reference expansion exponent map of a reference image is represented by a quadratic function of luminance or of low-filtered luminance. This quadratic function is for example defined by the relation:

E(p)=a[Y _(base)(p)]² +b[Y _(base)(p)]+c

where: Y_(base)(p) is a low-filtered luminance value of a pixel p of an image and a, b, and c are the parameters defining the quadratic function.

This quadratic function is described in detail in the patent application WO 2015/096955 mentioned in the background part of the present description.

Having defined as explained above a function of luminance or of low-filtered luminance representing a reference expansion exponent map for each reference image of a cluster, the parameters of a function representing an expansion exponent map associated to this cluster are obtained by:

-   -   obtaining the quadratic function parameters defining the         quadratic function representing the expansion exponent map of         each reference image of the cluster,     -   sorting these quadratic function parameters in ascending or         descending order, and     -   selecting the median values of the sorted quadratic function         parameters as parameters of the quadratic function of luminance         or of low-filtered luminance, this function representing the         expansion exponent map of the cluster.

In the example of FIG. 2, these functions are each defined by 3 parameters: a, b and c, which means 30 parameters a, 30 parameters b and 30 parameters c for one cluster. These parameters are sorted in ascending or descending order and the median value for each parameter (a_(median), b_(median), c_(median)) is selected as the parameters defining a function representing an expansion exponent map for a cluster. These parameters form “expansion exponent map data” of this cluster.

In the same manner, in the step S2, a visual feature is computed for each cluster based on the 30 visual features of the reference images of the cluster. This visual feature of a reference image is a feature representative of the luminance of the different reference images of the cluster. The visual feature of a reference image is for example the histogram of the luminance levels of the pixels of said reference image or image.

In a preferred embodiment, the visual feature of a reference image (as of the image to inverse tone map: see below) comprises only Gaussian function parameters defining Gaussian functions approximating the histogram of the luminance levels of the pixels of the reference image (as of the image to inverse tone map). In this embodiment, the luminance range of the image is divided in at least three consecutive luminance portions that correspond to shadows values, midtones values and highlights values. The size of these portions can be equal or not. For each of these three luminance range portions, the histogram is approximated by a Gaussian Function G(x) defined by three parameters P0, P1 and P2:

${G(x)} = {P\; {0 \cdot e^{{- \frac{1}{2}} \cdot {(\frac{x - {P\; 1}}{P\; 2})}^{2}}}}$

where P0 is a constant value, P1 is the mean value and P2 is the standard deviation.

Thus, in this embodiment, the visual feature of an image comprises only three parameters (P0, P1, P2) for each of the three luminance range portions, that means 9 parameters in total. These parameters are designated by:

-   -   P0_(S), P1_(S), P2_(S) for the first luminance range portion         (shadows),     -   P0_(M), P1_(M), P2_(M) for the second luminance range portion         (midtones), and     -   P0_(H), P1_(H), P2_(H) for the third luminance range portion         (highlights).

Thus, 9 parameters are generated for each reference image of the clusters.

As for the expansion exponent maps, the 9 parameters (P0_(S), P1_(S), P2_(S), P0_(M), P1_(M), P2_(M), P0_(M), P1_(M), P2_(M)) of the reference images of each cluster are sorted in ascending or descending order and the median values of each parameter is selected as a parameter for the cluster.

In the example of FIG. 2, as each cluster comprises 30 reference images, the 30 parameters P0_(S) of the 30 reference images of the cluster are sorted and the median value P0_(S) _(_) _(median) is selected as parameter P0_(S) for the visual feature of the cluster. The same sorting and selecting operations are executed for the others parameters (P1_(S), P2_(S), P0_(M), P1_(M), P2_(M), P0_(M), P1_(M), P2_(M)) so that 9 parameters (P0_(S) _(_) _(median), P1_(S) _(_) _(median), P2_(S) _(_) _(median), P0_(M) _(_) _(median), P1_(M) _(_) _(median), P2_(M) _(_) _(median), P0_(M) _(_) _(median), P1_(M) _(_) _(median), P2_(M) _(_) _(median)) are obtained as visual feature for the cluster.

As these steps are performed offline, the resulting functions representing expansion exponent maps of the different clusters and visual features of these clusters are stored in a memory. For each cluster, 3 parameters a, b and c are stored for representing the expansion exponent map and 9 parameters are stored for the visual feature.

When the steps S1 and S2 of the training phase are performed in an apparatus different from the apparatus performing the subsequent phase, the apparatus performing the subsequent phase is configured to store expansion exponent map data and visual feature for each cluster of reference images.

By referring again to FIG. 1, the next steps S3-S6 of the subsequent phase are performed on the fly on an image I to be expanded.

In the step S3, a visual feature for the image I is obtained as described above for the reference images. This visual feature is generated by a pre-processor. As described herein above, the visual feature of the image preferably only 9 parameters: P0_(S), P1_(S), P2_(S), P0_(M), P1_(M), P2_(M), P0_(H), P1_(H), P2_(H) defining 3 Gaussian functions in three predefined luminance range portions.

In the step S4, the visual feature of the image I is compared with the visual features of the clusters of reference images according to a distance criterion. For example, a Euclidean distance between the parameters of the visual feature of the image I and the parameters of the visual feature of each one of the clusters.

In the step S5, the cluster, the visual feature of which is the closest (minimum distance) to the visual feature of the image I is selected.

In the step S6, the 3 parameters a, b and c of the selected cluster are used to compute an expansion exponent map for the image, and this expansion exponent map is then applied to inverse tone map colors of pixels of the image I, notably as in the document WO2015/096955 already quoted.

FIG. 3 is a block diagram of an image processing device for executing on the fly the steps S3 to S6 on an image I or a video sequence comprising the image I.

The image processing device comprises a memory 1, a pre-processor 2, a comparator 3 and an inverse tone mapper 4.

The memory 1 stores, for each one of the clusters of reference images, expansion exponent map data and a visual feature, representative of the luminance of reference images of the cluster. These data are generated offline in the steps S1 and S2 by the present image processing device or by another different device.

The pre-processor 2 receives the image I and implements the step S3 in order to generate a visual feature for the image I.

The comparator 3 compares the visual feature of the image I with the visual features of the clusters as defined in step S4 and selects the cluster, the visual feature of which is the closest or best matches to the visual feature of the image I as defined in step S5.

The inverse tone mapper 4 applies the expansion exponent map computed using a function defined by expansion exponent map data of the selected cluster to the image I as defined in step S6, i.e. by parameters a, b and c defining a quadratic function.

When the inverse tone mapping is to be applied to a video sequence comprising a plurality of video shots, the same quadratic function—defined by the same parameters a, b and c of a cluster—may be used to compute the expansion exponent maps that will be applied to all the images of a same video shot. The video shots of the video sequence are identified by detecting the cuts in the video sequence. One image I is selected in the video shot. The steps S3 to S6 are executed for the image I and, at the end of the process, the same quadratic function of the selected cluster is used to compute the expansion exponent maps that are applied to the whole video shot comprising the image I. The image I can be the first image of the video shot or the nth image of the video shot.

In that case, the image processing device further comprises a cut detection circuit for obtaining the video shots of the video sequence and a selector for selecting one image in each video shot.

It can be noted that clusters of reference images can be generated for different categories of video content. For example, some clusters are generated for sport. Other clusters are generated for talk show, for series . . . In that case, the image processing can consult the electronic program guide (EPG) to determine the category of the current video sequence and selects the clusters of this category. The steps S3-S6 are then executed only for the clusters of this category.

While example embodiments are capable of various modifications and alternative forms, embodiments thereof are shown by way of example in the drawings and will herein be described in details. It should be understood, however, that there is no intent to limit example embodiments to the particular forms disclosed, but on the contrary, example embodiments are to cover all modifications, equivalents, and alternatives falling within the scope of the claims. 

1. A method for inverse tone mapping of an image, comprising the steps of: obtaining a visual feature for said image representative of luminance of said image, comparing the visual feature of said image with visual features of at least two clusters of reference images according to a distance criterion, wherein the visual feature of a cluster is representative of the luminance of reference images of this cluster, selecting, among said at least two clusters, the cluster, the visual feature of which is the closest to the visual feature of said image, and applying an expansion exponent map to said image, wherein said expansion exponent map is computed for said image based on expansion exponent map data of the selected cluster.
 2. The method according to claim 1, wherein the visual feature of said image comprises a histogram of luminance levels of pixels of said image.
 3. The method according to claim 2, wherein, the luminance range of said image being divided in at least three consecutive luminance portions, the visual feature of said image comprises Gaussian function parameters defining a Gaussian function for each of said at least three consecutive luminance portions, approximating the histogram of the luminance levels of the pixels of said image in said luminance portion.
 4. The method according to claim 1, wherein the expansion exponent map data of the selected cluster are parameters defining a quadratic function of luminance or of low-pass filtered luminance.
 5. The method according to claim 4, wherein the quadratic function is defined by the relation: E(p)=a[Y _(base)(p)]² +b[Y _(base)(p)]+c where: Y_(base)(p) is a low-filtered luminance value of a pixel p of an image and a, b, and c are the parameters of the quadratic function.
 6. A method for generating expansion exponent map data and visual feature for each one of at least two clusters of reference images to be used to implement the method of claim 1, comprising obtaining, for each of said at least two clusters: parameters defining a function representative of an expansion exponent map for this cluster, and a visual feature representative of the luminance of reference images of the cluster.
 7. The method according to claim 6, wherein the visual feature of said cluster comprises a histogram of luminance levels.
 8. The method according to claim 7, wherein the luminance range of reference images of said cluster is divided in at least three consecutive luminance portions, further comprising obtaining a visual feature for each of said reference images, wherein said visual feature comprises Gaussian function parameters defining a Gaussian function for each of said at least three consecutive luminance portions, approximating an histogram of luminance levels of the pixels of said reference image in said luminance portion.
 9. The method according to claim 8, wherein the Gaussian function parameters of the visual feature of said cluster are obtained by selecting the median values of the Gaussian function parameters of all reference images of said cluster as parameters of the Gaussian function of the visual feature of the cluster.
 10. The method according to claim 6, wherein the function representative of an expansion exponent map for this cluster is defined by parameters associated with a quadratic function.
 11. The method according to claim 10, wherein the quadratic function parameters of a cluster are obtained by: obtaining quadratic function parameters defining a function representative of an expansion exponent map for each reference image of the cluster, and selecting the median values of the quadratic function parameters of all reference image of the cluster as parameters of the quadratic function defining a function representative of an expansion exponent map for the cluster.
 12. The method according to claim 10, wherein the quadratic function is defined by the relation: E(p)=a[Y _(base)(p)]² +b[Y _(base)(p)]+c where: Y_(base)(p) is a low-filtered luminance value of a pixel p of an image and a, b, and c are the parameters of the quadratic function.
 13. An image processing device comprising: a memory for storing, for each one of at least two clusters of reference images, expansion exponent map data and a feature, called visual feature, representative of the luminance of reference images of the cluster, a pre-processor that obtains an image and a visual feature for said image, which is representative of luminance of said image, a comparator for comparing the visual feature of said image with the visual features of said at least two clusters according to a distance criterion, and for selecting, among said at least two clusters, the cluster, the visual feature of which is the closest to the visual feature of said image, an inverse tone mapper for applying an expansion exponent map to said image, wherein said expansion exponent map is computed for said image based on a function defined by expansion exponent map data of the selected cluster.
 14. The image processing device according to claim 13, wherein the expansion exponent map is defined by parameters associated with a quadratic function of the luminance value (Y_(base)) of a pixel (p) of this map.
 15. The image processing device according to claim 14, wherein the quadratic function is defined by the relation: E(p)=a[Y _(base)(p)]² +b[Y _(base)(p)]+c where: Y_(base)(p) is a low-filtered luminance value of a pixel p of an image and a, b, and c are the parameters of the quadratic function.
 16. The image processing device according to claim 13, wherein the visual feature of an image comprises the histogram of the luminance levels of the pixels of said image and wherein the comparator compares the histogram of the image with the histograms of the clusters.
 17. The Image processing device according to claim 13, wherein, the luminance range of an image being divided in at least three consecutive luminance portions, the visual feature of said image comprises Gaussian function parameters defining at least three Gaussian functions approximating the histogram of the luminance levels of the pixels of said image in said at least three consecutive luminance portions respectively.
 18. The image processing device according to claim 13, wherein the pre-processor is adapted to obtain a video sequence comprising a plurality of video shots, each video shot comprising at least one image and wherein the image processing device preferably further comprises: a cut detection circuit for detecting cuts between shots of the video sequence, a selector for selecting one image in at least one shot of the video sequence, said selected image being used by the pre-processor, the comparator and the first selector for selecting, among said at least two clusters, the cluster, the expansion exponent map of which is to be applied by the inverse tone mapper to the images of the shot to which said selected image belongs.
 19. An electronic device comprising an image processing device according to claim
 13. 20. The electronic device according to claim 19, selected in the group formed by a TV set, a set-top-box, a gateway, a cell phone and a tablet. 